Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fixed xmake derivation #16

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Add fixed xmake derivation #16

merged 1 commit into from
Jan 23, 2024

Conversation

HU90m
Copy link
Member

@HU90m HU90m commented Jan 18, 2024

The xmake derivation in nixpkgs uses lua.pkgs.cjson, but xmake has it's own patched version of cjson with hex literals support. The CHERIoT RTOS requires hex literals to build.

This derivation uses the internal patched version cjson.

Note, there is a second fallback json parser within in xmake which doesn't have hex literal support either.

We are planning to upstream this fix and remove our version of the package once we have.

pkgs/default.nix Outdated
@@ -14,6 +14,7 @@
bazel_ot = pkgs.callPackage ./bazel_ot {};
llvm_cheriot = pkgs.callPackage ./llvm_cheriot.nix {};
ibex-cosim = pkgs.callPackage ./ibex-cosim.nix {};
xmake = pkgs.callPackage ./xmake.nix {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to use import instead of callPackage if the package is itself the override. This case if some body wants to further override, it will use the original override provided by pkgs.xmake instead of the overriden one which is less tuneable.

The xmake derivation in nixpkgs uses `lua.pkgs.cjson`,
but xmake has it's own patched version of `cjson`
with hex literals support.
The CHERIoT RTOS requires hex literals to build.

This derivation uses the internal patched version `cjson`.

Note, there is a second fallback json parser within in xmake
which doesn't have hex literal support either.

Co-authored-by: Gary Guo <[email protected]>
@nbdd0121 nbdd0121 merged commit 89a453c into lowRISC:main Jan 23, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants